package main.java.com.lee.threadlocal;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @Description TODO
 * @Author winston
 * @DateTime 2021/12/16
 */
public class ThreadLocalDemo2 {
	private static final ThreadLocal<String> threadLocal = new ThreadLocal<>();

	public static void main(String[] args) {

		ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(
				10,
				10,
				10,
				TimeUnit.SECONDS,
				new LinkedBlockingQueue<>(2)){
			@Override
			protected void afterExecute(Runnable r, Throwable t) {
				threadLocal.remove();
			}
		};
	}
}
